import {addBenefits} from '@/base/api/BenefitApi';
import {deepAssign} from '@/base/util/Objects';
import {Page} from '@/base/Page';
import {Banners} from '@/base/model/Banners';
import {DeviceSort} from '@/base/model/DeviceSort';
import {DeviceModel, DeviceModelName} from '@/base/model/DeviceModel';

export class FormBloc {
  model: any = {
    benefitname: '',
    description:'',
    benefitIcon:'',
  };
  loading = false;
  fileList: Array<any> = []
  num: number = 0;
  // sortId: number = 0;
  // modelId: number = 0;
  isDetail = false;

  addModel(model) {
    this.loading = true;
    return addBenefits({
      benefitname: model.benefitname,
      description: model.description,
      benefitIcon: model.benefitIcon,
    }).then((res) => {
      return res;
    }).finally(() => {
      this.loading = false;
    });
  }
}
